<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
  <head>
    <title>
    </title>
    <meta charset="utf-8">
    <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" type="text/css" href="css/index.css">
    <link rel="stylesheet" href="css/ui-btn.css">
    <link rel="stylesheet" href="css/ui-base.css">
    <link rel="stylesheet" href="css/ui-box.css">
    <link rel="stylesheet" href="css/ui-color.css">
    <link rel="stylesheet" href="css/ui-res.css">
    <style>
        input{
            color: black;
            padding: 1px 6px;
            margin-left:6px;
        }
        input[type="text"]{
            padding: .2em .4em;
            margin:.4em .6em;
            font-size:1em;
        }
        input[type="button"]{
            padding: .6em .8em;
            margin:.4em .6em;
            font-size:1.2em;
        }
    </style>
    <script src="js/zy_control.js">
    </script>
    <script src="js/main.js">
    </script>
    <script type="text/javascript">
        window.uexOnload = function(type){
            uexWindow.subscribeChannelNotification("1", "easemobDemoGlobalPost");
            uexWindow.easemobDemoGlobalPost=globalPost;
        }
    

    
    //[2.5]
    function sendText(){
        var username = document.getElementById("sendTextusername").value;
        var chatType = document.getElementById("sendTextchatType").value;
        var content = document.getElementById("sendTextcontent").value;
        uexEasemob.sendText('{"username":"'+username+'","chatType":"'+chatType+'","content":"'+content+'","ext":"123"}');
    }
    
    //[2.6]
    function sendVoice(){
        var username = document.getElementById("sendVoiceusername").value;
        var chatType = document.getElementById("sendVoicechatType").value;
        var filePath = document.getElementById("sendVoicefilePath").value;
        var length = document.getElementById("sendVoicelength").value;
        var displayName = document.getElementById("sendVoicedisplayName").value;
        uexEasemob.sendVoice('{"username":"'+username+'","chatType":"'+chatType+'","filePath":"'+filePath+'","length":"'+length+'","displayName":"'+displayName+'"}');
    }
    
    //[2.7]
    function sendPicture(){
        var username = document.getElementById("sendPictureusername").value;
        var chatType = document.getElementById("sendPicturechatType").value;
        var filePath = document.getElementById("sendPicturefilePath").value;
        var displayName = document.getElementById("sendPicturedisplayName").value;
        uexEasemob.sendPicture('{"username":"'+username+'","chatType":"'+chatType+'","filePath":"'+filePath+'","displayName":"'+displayName+'"}');
    }
    
    //[2.8]
    function sendLocationMsg(){
        var username = document.getElementById("sendLocationMsgusername").value;
        var chatType = document.getElementById("sendLocationMsgchatType").value;
        var locationAddress = document.getElementById("sendLocationMsglocationAddress").value;
        var latitude = document.getElementById("sendLocationMsglatitude").value;
        var longitude = document.getElementById("sendLocationMsglongitude").value;
        uexEasemob.sendLocationMsg('{"username":"'+username+'","chatType":"'+chatType+'","locationAddress":"'+locationAddress+'","latitude":"'+latitude+'","longitude":"'+longitude+'"}');
    }
    
    //[2.9]
    function sendFile(){
        var username = document.getElementById("sendFileusername").value;
        var chatType = document.getElementById("sendFilechatType").value;
        var filePath = document.getElementById("sendFilefilePath").value;
        var displayName = document.getElementById("sendFiledisplayName").value;
        uexEasemob.sendFile('{"username":"'+username+'","chatType":"'+chatType+'","filePath":"'+filePath+'","displayName":"'+displayName+'"}');
    }
    
    //[2.10]
    function sendCmdMessage(){
        var chatType = document.getElementById("sendCmdMessagechatType").value;
        var action = document.getElementById("sendCmdMessageaction").value;
        var toUsername = document.getElementById("sendCmdMessagetoUsername").value;
        uexEasemob.sendCmdMessage('{"chatType":"'+chatType+'","action":"'+action+'","toUsername":"'+toUsername+'"}');
    }
    
    //[2.11]
    function setNotifyBySoundAndVibrate(){
        var enable = document.getElementById("setNotifyBySoundAndVibrateenable").value;
        var soundEnable = document.getElementById("setNotifyBySoundAndVibratesoundEnable").value;
        var vibrateEnable = document.getElementById("setNotifyBySoundAndVibratevibrateEnable").value;
        var userSpeaker = document.getElementById("setNotifyBySoundAndVibrateuserSpeaker").value;
        var showNotificationInBackgroud = document.getElementById("setNotifyBySoundAndVibrateshowNotificationInBackgroud").value;
        var acceptInvitationAlways = document.getElementById("setNotifyBySoundAndVibrateacceptInvitationAlways").value;
        var deliveryNotification = document.getElementById("setNotifyBySoundAndVibratedeliveryNotification").value;
        uexEasemob.setNotifyBySoundAndVibrate('{"enable":"'+enable+'","soundEnable":"'+soundEnable+'","vibrateEnable":"'+vibrateEnable+'","userSpeaker":"'+userSpeaker+'","showNotificationInBackgroud":"'+showNotificationInBackgroud+'","acceptInvitationAlways":"'+acceptInvitationAlways+'","deliveryNotification":"'+deliveryNotification+'"}');
    }
    
    //[2.12]
    function getMessageById(){
        var msgId = document.getElementById("getMessageByIdmsgId").value;
        uexEasemob.getMessageById('{"msgId":"'+msgId+'"}');
    }
    
    //[2.14]
    function sendVideo(){
        var username = document.getElementById("sendVideousername").value;
        var chatType = document.getElementById("sendVideochatType").value;
        var filePath = document.getElementById("sendVideofilePath").value;
        var length = document.getElementById("sendVideolength").value;
        var displayName = document.getElementById("sendVideodisplayName").value;
        uexEasemob.sendVideo('{"username":"'+username+'","chatType":"'+chatType+'","filePath":"'+filePath+'","length":"'+length+'","displayName":"'+displayName+'"}');
    }
    
    //[2.15]
    function sendHasReadResponseForMessage(){
        var msgId = document.getElementById("sendHasReadResponseForMessagemsgId").value;
        uexEasemob.sendHasReadResponseForMessage('{"msgId":"'+msgId+'"}');
    }
    


       </script>
</head>
<body class="um-vp " ontouchstart>
    <div id="page_0" class="up ub ub-ver" tabindex="0">
            <!--header开始-->
            <div id="header" class="uh t-wh ub" style="background: #27A73F;">
                <div class="umw4 ub ub-ac ub-pc" ontouchstart="zy_touch()" onclick="closeWin()">
                    <div ontouchstart="zy_touch('btn-act')" class="btn uba b-bla uinn5 c-blu c-m1 uc-a t-wh" style="background: -webkit-gradient(linear,0 0,0 100%,from(#FFCD00),color-stop(50%,#FFBC00),color-stop(50%,orange));border: 1px solid #FFA700;-webkit-border-radius: 8px;  text-align: center;color: #712000;  display: block; font-size: 1em; padding: 0.2em;">返回</div>
                </div>
                <h1 class="ut ub-f1 ulev0 ut-s tx-c" tabindex="0">Message</h1>
                <div class="umw4" ontouchstart="zy_touch()" onclick="">
                <!--插入按钮控件-->
                </div>
     </div>
     <!--header结束--><!--content开始-->
     <div id="content" class="ub-f1 tx-l t-bla" style="">
         
     <div class="conbor">
        <div class="consj" id="topDiv">
            <div id='globalPostArea'>全局广播显示区域</div><br><br>
            
            
             <div> </div><div>======Message==========</div>
            <div> </div><span>[2.5]  sendText</span>
            <div>username:</div><input class="textbox" type="text" id="sendTextusername" value="appcanuser2"></input>
            <div>chatType:</div><input class="textbox" type="text" id="sendTextchatType" value="0"></input>
            <div>content:</div><input class="textbox" type="text" id="sendTextcontent" value="Textcontent"></input>
            <input class='btn' type='button' value='调用接口' onclick='sendText()'></input>
            
            <div> </div><span>[2.6]  sendVoice</span>
            <div>username:</div><input class="textbox" type="text" id="sendVoiceusername" value="appcanuser2"></input>
            <div>chatType:</div><input class="textbox" type="text" id="sendVoicechatType" value="0"></input>
            <div>filePath:</div><input class="textbox" type="text" id="sendVoicefilePath" value="res://callRing.mp3"></input>
            <div>length:</div><input class="textbox" type="text" id="sendVoicelength" value="123"></input>
            <div>displayName:</div><input class="textbox" type="text" id="sendVoicedisplayName" value="callRing.mp3"></input>
            <input class='btn' type='button' value='调用接口' onclick='sendVoice()'></input>
            
            <div> </div><span>[2.7]  sendPicture</span>
            <div>username:</div><input class="textbox" type="text" id="sendPictureusername" value="appcanuser2"></input>
            <div>chatType:</div><input class="textbox" type="text" id="sendPicturechatType" value="0"></input>
            <div>filePath:</div><input class="textbox" type="text" id="sendPicturefilePath" value="res://2.jpg"></input>
            <div>displayName:</div><input class="textbox" type="text" id="sendPicturedisplayName" value="2.jpg"></input>
            <input class='btn' type='button' value='调用接口' onclick='sendPicture()'></input>
            
            <div> </div><span>[2.8]  sendLocationMsg</span>
            <div>username:</div><input class="textbox" type="text" id="sendLocationMsgusername" value="appcanuser2"></input>
            <div>chatType:</div><input class="textbox" type="text" id="sendLocationMsgchatType" value="0"></input>
            <div>locationAddress:</div><input class="textbox" type="text" id="sendLocationMsglocationAddress" value=""></input>
            <div>latitude:</div><input class="textbox" type="text" id="sendLocationMsglatitude" value=""></input>
            <div>longitude:</div><input class="textbox" type="text" id="sendLocationMsglongitude" value=""></input>
            <input class='btn' type='button' value='调用接口' onclick='sendLocationMsg()'></input>
            
            <div> </div><span>[2.9]  sendFile</span>
            <div>username:</div><input class="textbox" type="text" id="sendFileusername" value="appcanuser2"></input>
            <div>chatType:</div><input class="textbox" type="text" id="sendFilechatType" value="0"></input>
            <div>filePath:</div><input class="textbox" type="text" id="sendFilefilePath" value="res://3.jpg"></input>
            <div>displayName:</div><input class="textbox" type="text" id="sendFiledisplayName" value="3.jpg"></input>
            <input class='btn' type='button' value='调用接口' onclick='sendFile()'></input>
            
            <div> </div><span>[2.10]  sendCmdMessage</span>
            <div>chatType:</div><input class="textbox" type="text" id="sendCmdMessagechatType" value="0"></input>
            <div>action:</div><input class="textbox" type="text" id="sendCmdMessageaction" value=""></input>
            <div>toUsername:</div><input class="textbox" type="text" id="sendCmdMessagetousername" value="appcanuser2"></input>
            <input class='btn' type='button' value='调用接口' onclick='sendCmdMessage()'></input>
            
            <div> </div><span>[2.11]  setNotifyBySoundAndVibrate</span>
            <div>enable:</div><input class="textbox" type="text" id="setNotifyBySoundAndVibrateenable" value=""></input>
            <div>soundEnable:</div><input class="textbox" type="text" id="setNotifyBySoundAndVibratesoundEnable" value=""></input>
            <div>vibrateEnable:</div><input class="textbox" type="text" id="setNotifyBySoundAndVibratevibrateEnable" value=""></input>
            <div>userSpeaker:</div><input class="textbox" type="text" id="setNotifyBySoundAndVibrateuserSpeaker" value=""></input>
            <div>showNotificationInBackgroud:</div><input class="textbox" type="text" id="setNotifyBySoundAndVibrateshowNotificationInBackgroud" value=""></input>
            <div>acceptInvitationAlways:</div><input class="textbox" type="text" id="setNotifyBySoundAndVibrateacceptInvitationAlways" value=""></input>
            <div>deliveryNotification:</div><input class="textbox" type="text" id="setNotifyBySoundAndVibratedeliveryNotification" value=""></input>
            <input class='btn' type='button' value='调用接口' onclick='setNotifyBySoundAndVibrate()'></input>
            
            <div> </div><span>[2.12]  getMessageById</span>
            <div>msgId:</div><input class="textbox" type="text" id="getMessageByIdmsgId" value=""></input>
            <input class='btn' type='button' value='调用接口' onclick='getMessageById()'></input>
            
            <div> </div><span>[2.14]  sendVideo</span>
            <div>username:</div><input class="textbox" type="text" id="sendVideousername" value="appcanuser2"></input>
            <div>chatType:</div><input class="textbox" type="text" id="sendVideochatType" value="0"></input>
            <div>filePath:</div><input class="textbox" type="text" id="sendVideofilePath" value="res://1.mp4"></input>
            <div>length:</div><input class="textbox" type="text" id="sendVideolength" value="456"></input>
            <div>displayName:</div><input class="textbox" type="text" id="sendVideodisplayName" value="1.mp4"></input>
            <input class='btn' type='button' value='调用接口' onclick='sendVideo()'></input>
            
            <div> </div><span>[2.15]  sendHasReadResponseForMessage</span>
            <div>msgId:</div><input class="textbox" type="text" id="sendHasReadResponseForMessagemsgId" value=""></input>
            <input class='btn' type='button' value='调用接口' onclick='sendHasReadResponseForMessage()'></input>      </div>
        
        <div>======回调区域==========</div>
        <div id='TestCallBack'>原本内容</div>
        <div id='TestData'>原本内容</div>
        <div>======回调区域==========</div>
    </div>
    </div>
</body>
<script>

</script>
</html>
